package com.yunfeng.generate;

import com.yunfeng.generate.util.Resources;

public class GenYunfeng {

	private static String[] perperties = new String[] {
			"/aolin_adhesive_settings.properties",
			// "/aolin_badtypes_settings.properties",
			"/aolin_baojian_settings.properties",
			"/aolin_boms_settings.properties",
			"/aolin_cusquotesrecord_settings.properties",
			"/aolin_customer_settings.properties",
			"/aolin_customerorder_settings.properties",
			"/aolin_embossed_settings.properties",
			"/aolin_employee_settings.properties",
			"/aolin_inquirymaterials_settings.properties",
			"/aolin_oemsupplier_settings.properties",
			"/aolin_openmold_settings.properties",
			"/aolin_orderscheduling_settings.properties",
			"/aolin_purchasegoods_settings.properties",
			"/aolin_purchasematerials_settings.properties",
			"/aolin_quality_settings.properties",
			"/aolin_sendmaterials_settings.properties",
			"/aolin_sendsample_settings.properties",
			"/aolin_stampingproductionreport_settings.properties",
			"/aolin_supplier_settings.properties", };

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// Resources.init("/aolin_purchasegoods_settings.properties");
		// Resources.init("/aolin_quality_settings.properties");
		// Resources.init("/badtypes_settings.properties");
		// Resources.init("/aolin_embossed_settings.properties");
		// Resources.init("/aolin_boms_settings.properties");
		// Resources.init("/aolin_purchasematerials_settings.properties");
		int length = perperties.length;
		for (int i = 0; i < length; i++) {
			try {
				Resources.init(perperties[i]);
				GenerateFactory factory = new GenerateFactory();
				factory.genJavaTemplate();
				factory.genJspTemplate();
				factory.genSettings();
			} catch (Exception e) {
				e.printStackTrace();
				System.out.println(perperties[i]);
				System.exit(1);
			}
			// factory.genServer();
		}
	}

}
